﻿/*
*┌─────────────────────────────────┐
*│　描   述：事件打点
*│　类   名：Event.cs 
*│　创  建  人：DD
*│　创建时间：
*│　Copyright(C) 2020 by DD
*└─────────────────────────────────┘
*┌─────────────────────────────────┐
*│　修  改  人：
*│　创建日期：
*└─────────────────────────────────┘
*/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AppsFlyerSDK;

namespace DD{
    public class Event : MonoBehaviour
    {

        private static Event instance;
        public static Event Instance { get { if ( instance == null ) instance = new Event (); return instance; } }
        #region 事件方法

        public void CurrtentMoney(string count)
        {
            AppsFlyer.sendEvent ( count , new Dictionary<string , string> () );
        }

        public void Track(string eventName , string value)
        {
            Dictionary<string,string > data = new Dictionary<string, string> ();
            data.Add ( eventName , value );
            AppsFlyer.sendEvent ( eventName , data );
        }

        public void Track(string eventName)
        {
            Dictionary<string,string> TempDic = new Dictionary<string, string> ();
            AppsFlyer.sendEvent ( eventName , TempDic );
        }



        public void Banner_Load( ) { AppsFlyer.sendEvent ( "Banner_Load" , new Dictionary<string , string> () ); } //BannerLoad
        public void Inter_Load( ) { AppsFlyer.sendEvent ( "Inter_Load" , new Dictionary<string , string> () ); } //插页Load
        public void RV_Load( ) { AppsFlyer.sendEvent ( "RV_Load" , new Dictionary<string , string> () ); } //Rvload

        public void Banner_Showed( ) { AppsFlyer.sendEvent ( "Banner_Showed" , new Dictionary<string , string> () ); } //banner显示
        public void Inter_Showed( ) { AppsFlyer.sendEvent ( "Inter_Showed" , new Dictionary<string , string> () ); } //Inter显示
        public void RV_Showed( ) { AppsFlyer.sendEvent ( "RV_Showed" , new Dictionary<string , string> () ); } //RV显示
        #endregion
    }
}